package com.tsubaki.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tsubaki.entity.UserRole;
import com.tsubaki.mapper.UserRoleMapper;
import com.tsubaki.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author tsubaki
 * @since 2022-01-17
 */
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public Boolean addPermission(UserRole userRole) {
        int insert = userRoleMapper.insert(userRole);
        return insert > 0;
    }
}
